home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 24 / CU Amiga Magazine's Super CD-ROM 24 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-07].iso / CUCD / Utilities / vim-5.1 / syntax / muttrc.vim < prev    next >
Encoding:
Text File  |  1998-02-18  |  8.1 KB  |  145 lines

  1. " Vim syntax file
  2. " Language:    Mutt setup files
  3. " Maintainer:    Preben "Peppe" Guldberg (c928400@student.dtu.dk)
  4. " Last change:    Mon Feb  9 11:26:52 1998
  5.  
  6. " This file is for mutt 0.88. It is best used for version 0.81 to 0.88
  7. " Got a newer version of mutt?
  8. "     See:     http://www.student.dtu.dk/~c928400/vim
  9.  
  10. " Remove any old syntax stuff hanging around
  11. syn clear
  12.  
  13. " String variables
  14. syn keyword muttrcIdentString    alias_file alternates attach_sep attribution charset date_format
  15. syn keyword muttrcIdentString    decode_format dsn_notify dsn_return editor escape forw_format
  16. syn keyword muttrcIdentString    hdr_format hostname in_reply_to indent_str ispell local_sig
  17. syn keyword muttrcIdentString    local_site locale mailcap_path mask mbox_type msg_format pager
  18. syn keyword muttrcIdentString    pager_format pipe_sep pop_host pop_pass pop_user post_indent_str
  19. syn keyword muttrcIdentString    postponed print_cmd quote_regexp realname record remote_sig
  20. syn keyword muttrcIdentString    reply_regexp sendmail sendmail_bounce shell signature
  21. syn keyword muttrcIdentString    simple_search sort sort_aux sort_browser spoolfile status_chars
  22. syn keyword muttrcIdentString    status_format tmpdir to_chars url_regexp visual web_browser
  23. syn match   muttrcIdentString    "\<folder\|mbox\>"
  24.  
  25. " Number variables
  26. syn keyword muttrcIdentNumber    history pager_context pager_index_lines pop_port
  27. syn keyword muttrcIdentNumber    read_inc references timeout write_inc
  28.  
  29. " Boolean variables
  30. syn match muttrcIdentBoolean    "\<\(no\|inv\)\=\(allow_8bit\|arrow_cursor\|ascii_chars\|askbcc\)\>"
  31. syn match muttrcIdentBoolean    "\<\(no\|inv\)\=\(askcc\|attach_split\|autoedit\|auto_tag\|beep\)\>"
  32. syn match muttrcIdentBoolean    "\<\(no\|inv\)\=\(check_new\|confirmappend\|confirmcreate\)\>"
  33. syn match muttrcIdentBoolean    "\<\(no\|inv\)\=\(edit_hdrs\|fast_reply\|fcc_attach\|force_name\)\>"
  34. syn match muttrcIdentBoolean    "\<\(no\|inv\)\=\(forw_decode\|hdrs\|header\|help\|hold\)\>"
  35. syn match muttrcIdentBoolean    "\<\(no\|inv\)\=\(ignore_list_reply_to\|mark_old\|markers\|metoo\)\>"
  36. syn match muttrcIdentBoolean    "\<\(no\|inv\)\=\(mime_fwd\|pager_stop\|pipe_decode\|pipe_split\)\>"
  37. syn match muttrcIdentBoolean    "\<\(no\|inv\)\=\(point_new\|pop_delete\|prompt_after\|read_only\)\>"
  38. syn match muttrcIdentBoolean    "\<\(no\|inv\)\=\(resolve\|reverse_alias\|save_empty\|save_name\)\>"
  39. syn match muttrcIdentBoolean    "\<\(no\|inv\)\=\(sig_dashes\|smart_wrap\|sort_re\|status_on_top\)\>"
  40. syn match muttrcIdentBoolean    "\<\(no\|inv\)\=\(strict_threads\|suspend\|thorough_search\|tilde\)\>"
  41. syn match muttrcIdentBoolean    "\<\(no\|inv\)\=\(use_8bitmime\|use_domain\|use_from\|wait_key\)\>"
  42.  
  43. " Quadoption variables (noQuadoption is not supported here - eg set nocopy)
  44. syn match muttrcIdentQuadopt    "\<\(no\|inv\)\=\(abort_nosubject\|abort_unmodified\|copy\|delete\)\>"
  45. syn match muttrcIdentQuadopt    "\<\(no\|inv\)\=\(include\|move\|postpone\|print\|recall\|reply_to\)\>"
  46. syn match muttrcIdentQuadopt    "\<\(no\|inv\)\=\(use_mailcap\|verify_sig\)\>"
  47.  
  48. " The variables takes the following arguments
  49. syn match  muttrcVarString    "=\s*[^ #\t"']\+"lc=1 contains=muttrcEscape
  50. syn region muttrcVarString    start=+=\=\s*"+ms=e skip=+\\"+ end=+"+ oneline contains=muttrcEscape
  51. syn region muttrcVarString    start=+=\=\s*'+ms=e skip=+\\'+ end=+'+ oneline contains=muttrcEscape
  52. " Numbers and Quadoptions may be surrounded by " or '
  53. syn match muttrcVarNumber    /=\s*[0-9]\+/lc=1
  54. syn match muttrcVarNumber    /"=\s*[0-9]\+"/lc=1
  55. syn match muttrcVarNumber    /'=\s*[0-9]\+'/lc=1
  56. syn match muttrcVarQuadopt    +=\s*\(ask-\)\=\(yes\|no\)+lc=1
  57. syn match muttrcVarQuadopt    +"=\s*\(ask-\)\=\(yes\|no\)"+lc=1
  58. syn match muttrcVarQuadopt    +'=\s*\(ask-\)\=\(yes\|no\)'+lc=1
  59.  
  60. " Escape sequences (back-tick,`, shell-quote goes here too)
  61. syn match muttrcEscape        +\\[#tnr"']+
  62. syn match muttrcEscape        +`+
  63.  
  64. " Now catch some email addresses and headers (purified version from mail.vim)
  65. syn match muttrcEmail        "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+"
  66. syn match muttrcHeader        "\(From:\|To:\|Cc:\|Bcc:\|Reply-To:\|Subject:\|Return-Path:\|Received:\|Date:\|Replied:\)"
  67. " For those that prefer to specify without the colon
  68. "syn match    muttrcHeader    "\(From\|To\|Cc\|Bcc\|Reply-To\|Subject\|Return-Path\|Received\|Date\|Replied\)"
  69.  
  70. " Some statements (a few have function like highlighting just below)
  71. syn keyword muttrcKeyword    set unset
  72. syn keyword muttrcKeyword    auto_view hdr_order ignore unignore lists unlists
  73. syn keyword muttrcKeyword    mailboxes my_hdr unmy_hdr push source toggle unalias
  74.  
  75. " Various hooks
  76. syn match muttrcHook        "\<\(fcc\|folder\|mbox\|save\|send\)-hook\>"
  77.  
  78. " Aliases contain a key word: let's show it
  79. syn region muttrcAliasFill    contained transparent matchgroup=muttrcFunc start="\<alias\>" matchgroup=muttrcFuncKey end="\S\+"
  80. syn match  muttrcAliasLine    "alias\s\+\S\+" contains=muttrcAliasFill
  81.  
  82. " These are convinient to have defined for bind and macro
  83. syn keyword muttrcMap        contained index pager alias attach browser editor compose pgp url
  84.  
  85. " Bindings have map, key and function.
  86. syn region muttrcBindFill    contained transparent matchgroup=muttrcFunc start="\<bind\>"  skip="\<\(index\|pager\|alias\|attach\|browser\|editor\|compose\|pgp\|url\)\>" matchgroup=muttrcFuncKey end="\S\+" contains=muttrcMap
  87. syn match  muttrcBindLine    "\s*bind\s\+\S\+\s\+\S\+" contains=muttrcBindFill
  88.  
  89. " Macros are more or less the same
  90. syn region muttrcMacroFill    contained transparent matchgroup=muttrcFunc start="\<macro\>" skip="\<\(index\|pager\|alias\|attach\|browser\|editor\|compose\|pgp\|url\)\>" matchgroup=muttrcFuncKey end="\S\+" contains=muttrcMap
  91. syn match  muttrcMacroLine    "\s*macro\s\+\S\+\s\+\S\+" contains=muttrcMacroFill
  92.  
  93. " Colour definitions takes object, foreground and background arguments (regexps excluded).
  94. syn keyword muttrcColorObj    contained attachment body bold error header hdrdefault
  95. syn keyword muttrcColorObj    contained indicator markers message search signature
  96. syn keyword muttrcColorObj    contained status tilde tree underline
  97. syn match   muttrcColorObj    "\<quoted[1-9]\=\>"
  98. syn match   muttrcColorFG    contained "\<\(bright\)\=\(white\|black\|green\|magenta\|blue\|cyan\|yellow\|red\|default\)\>"
  99. syn match   muttrcColorFG    contained "\<\(bright\)\=color[0-9]\{1,2}\>"
  100. syn match   muttrcColorBG    contained "\<\(white\|black\|green\|magenta\|blue\|cyan\|yellow\|red\|default\)\>"
  101. syn match   muttrcColorBG    contained "\<color[0-9]\{1,2}\>"
  102. " Now for the total match
  103. syn region  muttrcColorFill    contained matchgroup=muttrcColor start="\<color\>" matchgroup=muttrcColorObj end="\<\(attachment\|body\|bold\|error\|header\|hdrdefault\|indicator\|markers\|message\|normal\|quoted[0-9]\=\|search\|signature\|status\|tilde\|tree\|underline\)\>"
  104. syn match   muttrcColorLine    "\s*color\s\+\S\+\s\+\(bright\)\=\S\+\s\+\S\+" contains=muttrcColor\(Fill\|FG\|BG\)
  105.  
  106. " Mono are almst like color (ojects ingherited from color)
  107. syn keyword muttrcMonoAttrib    contained none bold underline reverse standout
  108. syn region  muttrcMonoFill    contained matchgroup=muttrcMono start="\<mono\>" matchgroup=muttrcMonoObj end="\<\(attachment\|body\|bold\|error\|header\|hdrdefault\|indicator\|markers\|message\|normal\|quoted[0-9]\=\|search\|signature\|status\|tilde\|tree\|underline\)\>"
  109. syn match   muttrcMonoLine    "\s*mono\s\+\S\+\s\+\S\+" contains=muttrcMono\(Fill\|Attrib\)
  110.  
  111. " comments are quite easy here: a # that is not preceded by a \
  112. syn match muttrcComment    "^#.*$"
  113. syn match muttrcComment    "[^\\]#.*$"lc=1
  114.  
  115. if !exists("did_muttrc_syntax_inits")
  116.   let did_muttrc_syntax_inits = 1
  117.   " The default methods for highlighting.  Can be overridden later
  118.   hi link muttrcKeyword        Keyword
  119.   hi link muttrcHook        Keyword
  120.   hi link muttrcIdentString    Identifier
  121.   hi link muttrcIdentNumber    Identifier
  122.   hi link muttrcIdentBoolean    Identifier
  123.   hi link muttrcIdentQuadopt    Identifier
  124.   hi link muttrcVarString    String
  125.   hi link muttrcVarNumber    Number
  126.   hi link muttrcVarQuadopt    Boolean
  127.   hi link muttrcComment        Comment
  128.   hi link muttrcEscape        SpecialChar
  129.   hi link muttrcEmail        String
  130.   hi link muttrcHeader        Type
  131.   hi link muttrcMap        Identifier
  132.   hi link muttrcFunc        Keyword
  133.   hi link muttrcFuncKey        Type
  134.   hi link muttrcColor        Keyword
  135.   hi link muttrcColorObj    Identifier
  136.   hi link muttrcColorFG        String
  137.   hi link muttrcColorBG        String
  138.   hi link muttrcMono        Keyword
  139.   hi link muttrcMonoObj        Identifier
  140.   hi link muttrcMonoAttrib    String
  141.   hi link muttrcStrError    Error
  142. endif
  143.  
  144. "EOF    vim: ts=8 noet tw=100 sw=8 sts=0
  145.